package com.zzyl.nursing.controller.member;

import com.zzyl.common.core.domain.AjaxResult;
import com.zzyl.nursing.dto.memberDto.UserLoginRequestDto;
import com.zzyl.nursing.service.member.IMemberService;
import com.zzyl.nursing.vo.LoginVo;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping
@Slf4j
@RequiredArgsConstructor
public class MemberLoginController {

    private final IMemberService memberService;
    //登录
    @RequestMapping("/member/user/login")
    public AjaxResult login(@RequestBody UserLoginRequestDto loginDao) {
        LoginVo loginVo = memberService.loginUser(loginDao);
        return AjaxResult.success(loginVo);
    }
}
